# pull base image
# --------------
FROM kylin-server-10-sp2-aarch64:b09

# Maintainer
# --------------
MAINTAINER support  <support@bessystem.com>

# Environment variables required for this build
# ---------------------------------------------
ENV JAVA_HOME=/usr/local/docker/java/jdk/jdk8u382-b05
ENV CLASSPATH=$JAVA_HOME/bin
ENV PATH=.:$JAVA_HOME/bin:$PATH
ENV BES_MQ_HOME /opt/besmq

# Basic support
#-----------------------------
ADD OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz /usr/local/docker/java/jdk/
COPY BESMQ2.1.0.1584.00*.zip /tmp/
COPY besmq.lic.txt /tmp/
RUN mkdir -p "$BES_MQ_HOME"
COPY BESMQ-2.1.0.1584.tar.gz /tmp/BESMQ-2.1.0.1584.tar.gz
RUN yum -y install net-tools && \
    tar -zxf /tmp/BESMQ-2.1.0.1584.tar.gz -C $BES_MQ_HOME && \
    chmod -R 755 $BES_MQ_HOME && \
    $BES_MQ_HOME/bin/lmadm import-lic --sourcepath=/tmp &&\
    ls -l $BES_MQ_HOME
#Setup besmq
#----------------------------------------------
EXPOSE 3100 3200 3300 8490

WORKDIR $BES_MQ_HOME

ENTRYPOINT cd bin; ./startconsole; tail -f /dev/null

